# ifndef __HoluxCrdLoader_H_
# define __HoluxCrdLoader_H_

# include "Load.h"
# include "Map.h"

struct CCrdStringRef;

class CCrdLoader : public CMapLoader {
  public:
	// Override.
	virtual bool IsValid (const char * _pData, size_t _cFileSize) const;
	virtual LoadStatus_t Load (const char * _pData, size_t _cFileSize, const char * _strFileName, map_t * _pMap);

  protected:
	rgn_t & AddPoint (size_t _cLevel, USHORT _usType, RGN_KIND _Kind, float _x, float _y, string_t & _strLabel, city_t * _pCity, string_t & _strPhone, size_t _cBeginPos, size_t _cSize);
	rgn_t & AddPoly  (size_t _cLevel, USHORT _usType, RGN_KIND _Kind, points_t & _points, string_t & _strLabel, city_t * _pCity,                       size_t _cBeginPos, size_t _cSize);

	void ReadString (string_t & _str, const CCrdStringRef & _Ref);

	map_t * m_pMap;

	const char * m_pData;
	size_t m_cFileSize;

	file_refs_t m_file_refs;
};

# endif // __HoluxCrdLoader_H_
